package tool;

import java.util.Hashtable;

import files.Files;

public class DBFileUtils {

	private static Hashtable dbNames;
	
	static {
		dbNames = new Hashtable();
		Style current = new Style("file:///E:/_Calme", Files.BOOT_ROOT + "/" + "_Calme.db",
				Files.BOOT_ROOT + "/DBProperties/_Calme.db.properties");
		dbNames.put("Calme", current);
		current = new Style("file:///E:/_Good", Files.BOOT_ROOT + "/" + "_Good.db",
				Files.BOOT_ROOT + "/DBProperties/_Good.db.properties");
		dbNames.put("Good", current);
		current = new Style("file:///E:/_Energie", Files.BOOT_ROOT + "/" + "_Energie.db",
				Files.BOOT_ROOT + "/DBProperties/_Energie.db.properties");
		dbNames.put("Energie", current);
		current = new Style("file:///E:/_Styles/Hip Hop", Files.BOOT_ROOT + "/" + "Hip Hop.db",
				Files.BOOT_ROOT + "/DBProperties/Hip Hop.db.properties");
		dbNames.put("Hip Hop", current);
		current = new Style("file:///E:/_Styles/Poubelle", Files.BOOT_ROOT + "/" + "Poubelle.db",
				Files.BOOT_ROOT + "/DBProperties/Poubelle.db.properties");
		dbNames.put("Poubelle", current);
	}
	
	public static String getDBPath(String genre) {
		Style style = getStyle(genre);
		return style.getDbPath();
	}
	
	public static String getFolderPath(String genre) {
		Style style = getStyle(genre);
		return style.getFolderPath();
	}

	public static String getDBPropertiesPath(String genre) {
		Style style = getStyle(genre);
		return style.getDbPropertiesPath();
	}

	private static Style getStyle(String genre) {
		return (Style) dbNames.get(genre);
	}

	public static String getFolderName(String genre) {
		Style style = getStyle(genre);
		return style.getFolderName();
	}

}
